''' 迭代工具函数 zip'''
# l1 = [1,2,3,4]
# l2 = [5,6,7,8,9]
# l3 = [10,11,12,13,14,15,16,17,18,19]
#
# zip1 = zip(l1)
# print(zip1)
# print(list(zip1))
#
# zip2 = zip(l1,l2)
# print(list(zip2))
#
# zip3 = zip(l1,l2,l3)
# print(list(zip3))

'''
输出：
[(1,), (2,), (3,), (4,)]
[(1, 5), (2, 6), (3, 7), (4, 8)]
[(1, 5, 10), (2, 6, 11), (3, 7, 12), (4, 8, 13)]
'''

'''
练习
'''

number = ['10086','10000','10010','10011','95588']
name = ['中国移动','中国电信','中国联通','中国铁通']

zipped = zip(number,name)

# print(list(zipped))
# print(tuple(zipped))
print(dict(zipped))

for a,b in zipped:
    print(a,b)

'''
输出：
[('10086', '中国移动'), ('10000', '中国电信'), ('10010', '中国联通'), ('10011', '中国铁通')]
10086 中国移动
10000 中国电信
10010 中国联通
10011 中国铁通
'''





